This invention relates to a method and system for testing behaviour of procedures, and more particularly to a method and system for separate testing of the parallel and isolated behaviour of procedures.
Many software systems are developed for parallel execution of sever applications. Each software system contains a functionally closed set of procedures. In order to ensure correct implementation of the software system, it is desirable to determine a software contract, i.e., elements and functional specifications of external interfaces of the software system, and carry out conformance testing of the software contract implementation. Since the elements of the software contract are procedures, it is in fact Application Programming Interface (API) testing.
In software systems, some procedures are called sequentially, without parallelism. Some procedures are called from parallel processes.
In order to test the implementation correctness of procedures of software systems, it is desirable to formalize requirements of correct behaviour of procedures during parallel calls.
Currently, the most common method of testing the parallel behaviour of procedures is a parallel call to procedures. During the parallel call, parameters of the call and returned results are recorded in a trace. Then, either manual analysis of a trace is applied, or the special tools for analysis of particular traces are created. Both approaches are very labour-consuming and prone to errors.
In attempting to formalize the requirements of correct parallel behaviour of procedures, various formal languages and calculations, e.g., temporal logic, are applied. However, their common disadvantage is the difficulty of generating the tests from the collected records or traces.
It is therefore desirable to provide a systematic method for testing procedures which enables reliable testing.
The present invention specifies behaviour of a group of procedures to be tested in a parallel mode separately from consecutive procedures which have no parallelism. The group of procedures is tested based on the specified behaviour, separately from consecutive procedures.
In accordance with an aspect of the present invention, there is provided a method for testing procedures. The method comprises separating parallel procedures from consecutive procedures which have no parallelism; defining a group of parallel procedures to be tested in a parallel mode; specifying behaviour of the group of procedures in the parallel mode; and testing the group of procedures in the parallel mode separately from the consecutive procedures, based on the specified behaviour.
In accordance with another aspect of the present invention, there is provided a test plan design system for planning testing of procedures. The system comprises means for separating parallel procedures from consecutive procedures which have no parallelism; means for defining a group of parallel procedures to be tested in a parallel mode; means for specifying behaviour of the group of procedures in the parallel mode; and a test suite for testing the group of procedures in the parallel mode separately from the consecutive procedures, based on the specified behaviour.